﻿using System;
using System.Collections.Generic;
using Meqs.Entity;
using Meqs.Entity.Views;
using System.Collections;

namespace Meqs.Logic.Interface
{
    public interface IClsInfoLogic : ICommonLogic<ClsInfo, int>
    {

        /// <summary>
        /// 查询指定的Grade
        /// </summary>
        /// <param name="idList"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<int> FindGradeByIdList(string idList, string schoolMark);


        /// <summary>
        /// 根据年级ID来查询班级信息
        /// </summary>
        /// <param name="gradeID"></param>
        /// <returns></returns>
        IList<VClsInfo> FindClassInfo(Hashtable ht);

        /// <summary>
        /// 根据年级ID, 所在学年来查询班级信息
        /// </summary>
        IList<VClsInfo> FindClassInfoEx(Hashtable ht);

        /// <summary>
        /// 根据年级ID, 所在学年和学科来查询班级信息
        /// </summary>
        IList<VClsInfo> FindClassInfoByCauseID(Hashtable ht);

        /// <summary>
        /// 根据班級ID来刪除班级信息,将班级信息置为无效，并删除联系表数据
        /// </summary>
        /// <param name="RID"></param>
        /// <returns></returns>
        int DeleteByID(int RID);

        /// <summary>
        /// 根据教师ID查询教师所带的有效班级课程数
        /// </summary>
        /// <param name="teachRID"></param>
        /// <returns></returns>
        int FindCountByTeacherID(int teachRID);

        /// <summary>
        /// 获取参加某次考试的所有班级信息(校考)
        /// </summary>
        /// <param name="ht"></param>
        /// <returns></returns>
        IList<ClsInfo> FindByExamClass_S(Hashtable ht);

        /// <summary>
        /// 获取参加某次考试的所有班级信息(统考)
        /// </summary>
        /// <param name="ht"></param>
        /// <returns></returns>
        IList<ClsInfo> FindByExamClass_E(Hashtable ht);

        /// <summary>
        /// 更换班主任信息
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        int UpdateHeader(List<int> list);

        /// <summary>
        /// 更换班主任信息
        /// </summary>
        /// <param name="ht"></param>
        /// <returns></returns>
        int UpdateHeader(Hashtable ht);

        /// <summary>
        /// 新增班级
        /// </summary>
        /// <param name="ht"></param>
        /// <returns></returns>
        int AddNewClass(ClsInfo clsInfo);

        /// <summary>
        /// 修改班级信息（除开ClsNo）
        /// </summary>
        /// <param name="ht"></param>
        /// <returns></returns>
        int UpdateClsExceptClsNO(ClsInfo clsInfo);

        /// <summary>
        /// 修改班级序号
        /// </summary>
        /// <param name="ht"></param>
        /// <returns></returns>
        int UpdateClsNO(List<ClsInfo> listClsInfo);

        /// <summary>
        /// 獲取與教師有關的班級
        /// </summary>
        IList<ClsAndCauseView> GetClsInTeacher(String schoolMark, int teachID);

        /// <summary>
        /// 获取班主任所在的历史班级
        /// </summary>
        /// <param name="schoolYear"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        IList<ClsInfo> SelectHisClsInfoByHeader(int schoolYear, int userId);
    }
}